<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<html>
<head>
<title>用户列表</title>
<script type="text/javascript">
$(document).ready(function(){
	$('#repwdForm').vaildAjax(function(data){
		if(data=='true'){
			BaseJs.alert('修改密码成功');
		}else{
			BaseJs.alert('密码修改失败');
		}
	});
});
</script>
</head>
<body>
<h2 class="title"><span>用户列表(共有<s:property value="users.totalCount" />条记录)</span><m:permiss permiss="UESR_EDIT"><m:imgA img="addUser" msg="添加新用户"  action="user/EditUser!view" /></m:permiss></h2>
<div id="repwd" style="display: none;">
	<s:form action="user/EditUser!repwd" id="repwdForm">
		<s:hidden name="user.id" />
		<table class="form" >
			<tr>
				<th width="30%">输入密码</th>
				<td width="70%"><s:password name="user.passwd" id="pwd" cssClass="rule[required]" /></td>
			</tr>
			<tr>
				<th>再次输入密码</th>
				<td><s:password name="password" cssClass="rule[required,confirm[pwd]]"  /></td>
			</tr>
		</table>
	</s:form>
</div>
<table class="list">
	<tr>
		<!-- <th width="10%">用户系统编号</th> -->
		<th width="20%">登录名</th>
		<th width="20%">姓名</th>
		<th width="10%">性别</th>
		<th width="10%">电话</th>
		<th width="15%">部门</th>
		<th width="10%">电子邮件</th>
		<th width="5%">状态</th>
		<th width="10%">角色/修改信息</th>
	</tr>
	<s:iterator value="users.items">
		<tr>
			<!-- <td><s:property value="id" /></td>-->
			<td><s:property value="nickName" /></td>
			<td><s:property value="name" /></td>
			<td><s:if test="man">男</s:if><s:else>女</s:else></td>
			<td><s:property value="telel" /></td>
			<td><m:property value="dept"/></td>
			<td><s:property value="email" /></td>
			<td><s:if test="enable">可用</s:if><s:else>禁用</s:else></td>
			<td><m:permiss permiss="ROLE_EDIT"><m:imgA img="edit" msg="修改用户信息" action="user/EditUser!view?user.id=${id}" /></m:permiss></td>
		</tr>
	</s:iterator>
</table>
<m:page value="${users}" showSeaBar="true" />
</body>
</html>